﻿<%@ Page Title="ViewEpisode" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeFile="ViewEpisode.aspx.cs" Inherits="ViewEpisode" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="act1" %>
<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <script type="text/javascript">
        window.onload = function () {
            try {
                fadeOutStatusMinus();
                fadeOutStatusPlus();
                fadeOutEdit();
                fadeOutDelete();
            } catch (err) { }
        };
        function fadeInStatusMinus() {
            document.getElementById("MainContent_StatusMinusButton").style.opacity = 1;
            document.getElementById("MainContent_StatusMinusButton").style.filter = 'alpha(opacity=' + 100 + ')';
        }
        function fadeOutStatusMinus() {
            document.getElementById("MainContent_StatusMinusButton").style.opacity = .5;
            document.getElementById("MainContent_StatusMinusButton").style.filter = 'alpha(opacity=' + 50 + ')';
        }
        function fadeInEdit() {
            document.getElementById("MainContent_EditButton").style.opacity = 1;
            document.getElementById("MainContent_EditButton").style.filter = 'alpha(opacity=' + 100 + ')';
        }
        function fadeOutEdit() {
            document.getElementById("MainContent_EditButton").style.opacity = .5;
            document.getElementById("MainContent_EditButton").style.filter = 'alpha(opacity=' + 50 + ')';
        }
        function fadeInDelete() {
            document.getElementById("MainContent_DeleteButton").style.opacity = 1;
            document.getElementById("MainContent_DeleteButton").style.filter = 'alpha(opacity=' + 100 + ')';
        }
        function fadeOutDelete() {
            document.getElementById("MainContent_DeleteButton").style.opacity = .5;
            document.getElementById("MainContent_DeleteButton").style.filter = 'alpha(opacity=' + 50 + ')';
        }
        function doStatusMinus() {
            var answer = confirm("Biztos le szeretné tiltani az adott epizódot?")
            if (answer)
                return true;
            else
                return false;
        }
        function doStatusPlus() {
            var answer = confirm("Biztos engedélyezni szeretné az adott epizódot?")
            if (answer)
                return true;
            else
                return false;
        }
        function doEdit() {
            var answer = confirm("Biztos módosítani szeretné az adott epizódot?")
            if (answer)
                return true;
            else
                return false;
        }
        function doDelete() {
            var answer = confirm("Biztos törölni szerené az adott epizódot?")
            if (answer) {
                return true;
            }
            else
                return false;
        }
    </script>
    <asp:UpdatePanel ID="EpisodeUpdatePanel" runat="server" UpdateMode="Always">
    <ContentTemplate>
            <fieldset id="EpisodePanel">
            <div id="mainDiv" class="mainDiv" runat="server">
            <div id="toolDiv" class="toolDiv" runat="server" visible="false">
                <asp:Table ID="Table2" runat="server" Width="100%">
                    <asp:TableRow>
                        <asp:TableCell>
                            <asp:ImageButton ID="StatusMinusButton" runat="server" ImageUrl="~/images/icons/minus-icon.png" ToolTip="Epizód letiltása" Visible="false"
                                onmouseover="fadeInStatusMinus()" onmouseout="fadeOutStatusMinus()" OnClientClick="return doStatusMinus()" onclick="StatusMinusButton_Click"/>
                            <asp:ImageButton ID="StatusPlusButton" runat="server" ImageUrl="~/images/icons/plus-icon.png" ToolTip="Epizód engedélyezése" Visible="false"
                                onmouseover="fadeInStatusPlus()" onmouseout="fadeOutStatusPlus()" OnClientClick="return doStatusPlus()" onclick="StatusPlusButton_Click"/>
                            <asp:ImageButton ID="EditButton" runat="server" ImageUrl="~/images/icons/edit-icon.png" ToolTip="Epizód szerkesztése"
                                onmouseover="fadeInEdit()" onmouseout="fadeOutEdit()" OnClientClick="return doEdit()" onclick="EditButton_Click"/>
                            <asp:ImageButton ID="DeleteButton" runat="server" ImageUrl="~/images/icons/delete-icon.png" ToolTip="Epizód törlése"
                                onmouseover="fadeInDelete()" onmouseout="fadeOutDelete()" OnClientClick="return doDelete()" onclick="DeleteButton_Click"/>
                        </asp:TableCell>
                    </asp:TableRow>
                </asp:Table>
            </div>
            <asp:Table ID="EpisodeContent" runat="server">
                <asp:TableRow>
                    <asp:TableCell>
                        <asp:Table ID="EpisodeInfo" runat="server">
                            <asp:TableRow>
                                <asp:TableCell>
                                    <asp:Image ID="EpisodeImg" runat="server" />
                                </asp:TableCell>
                                <asp:TableCell>
                                    <asp:Table ID="Table1" runat="server">
                                    <asp:TableRow><asp:TableCell>
                                        <asp:Label ID="EpisodeHunTitle" runat="server"></asp:Label>
                                    </asp:TableCell></asp:TableRow>
                                    <asp:TableRow><asp:TableCell>
                                        <asp:Label ID="EpisodeOrigTitle" runat="server"></asp:Label>
                                        <asp:Label ID="EpisodeStatus" runat="server"></asp:Label>
                                    </asp:TableCell></asp:TableRow>
                                    <asp:TableRow><asp:TableCell>
                                        <asp:Label ID="Label7" runat="server" Text="Sorozat: " Font-Bold="true"></asp:Label>
                                        <asp:HyperLink ID="EpisodeSeries" runat="server"></asp:HyperLink>
                                    </asp:TableCell></asp:TableRow>
                                    <asp:TableRow><asp:TableCell>
                                        <asp:Label ID="Label9" runat="server" Text="Évad: " Font-Bold="true"></asp:Label>
                                        <asp:HyperLink ID="EpisodeSeason" runat="server"></asp:HyperLink>
                                    </asp:TableCell></asp:TableRow>
                                    <asp:TableRow><asp:TableCell>
                                        <asp:Label ID="Label11" runat="server" Text="Értékelés: " Font-Bold="true"></asp:Label>
                                        <act1:Rating ID="EpisodeRating" runat="server" EmptyStarCssClass="emptyRatingStar" FilledStarCssClass="filledRatingStar" RatingAlign="Horizontal"
                                          WaitingStarCssClass="savedRatingStar" StarCssClass="ratingStar" MaxRating="5" OnChanged="Rating_Changed" ></act1:Rating>
                                    </asp:TableCell></asp:TableRow>
                                    <asp:TableRow><asp:TableCell>
                                        <asp:Label ID="Label1" runat="server" Text="Megjelenés dátuma: " Font-Bold="true"></asp:Label>
                                        <asp:Label ID="EpisodeReleaseDate" runat="server"></asp:Label>
                                    </asp:TableCell></asp:TableRow>
                                    <asp:TableRow><asp:TableCell>
                                        <asp:Label ID="Label5" runat="server" Text="Hossza: " Font-Bold="true"></asp:Label>
                                        <asp:Label ID="EpisodeLength" runat="server"></asp:Label>
                                    </asp:TableCell></asp:TableRow>
                                    <asp:TableRow><asp:TableCell>
                                        <asp:Label ID="Label3" runat="server" Text="Műfajok: " Font-Bold="true"></asp:Label>
                                        <asp:Label ID="EpisodeGenres" runat="server"></asp:Label>
                                    </asp:TableCell></asp:TableRow>
                                    <asp:TableRow><asp:TableCell>
                                        <asp:Label ID="Label2" runat="server" Text="Rendezők: " Font-Bold="true"></asp:Label>
                                        <asp:Label ID="EpisodeDirectors" runat="server"></asp:Label>
                                    </asp:TableCell></asp:TableRow>
                                    <asp:TableRow><asp:TableCell>
                                        <asp:Label ID="Label4" runat="server" Text="Írók: " Font-Bold="true"></asp:Label>
                                        <asp:Label ID="EpisodeWriters" runat="server"></asp:Label>
                                    </asp:TableCell></asp:TableRow>
                                    <asp:TableRow><asp:TableCell>
                                        <asp:Label ID="Label6" runat="server" Text="Főszereplők: " Font-Bold="true"></asp:Label>
                                        <asp:Label ID="EpisodeStars" runat="server"></asp:Label>
                                    </asp:TableCell></asp:TableRow>
                                    </asp:Table>
                                </asp:TableCell>
                            </asp:TableRow>
                        </asp:Table>
                    </asp:TableCell>
                </asp:TableRow>
                <asp:TableRow>
                    <asp:TableCell>
                        <asp:Label ID="EpisodeDescription" runat="server"></asp:Label>
                    </asp:TableCell>
                </asp:TableRow>
                <asp:TableRow>
                    <asp:TableCell></asp:TableCell>
                </asp:TableRow>
            </asp:Table>
            </div>
        </fieldset>
        <h2>
            Kommentek
        </h2>
        <fieldset id="CommentPanelForm">
            <asp:Table ID="CommentForm" runat="server">
                <asp:TableRow>
                    <asp:TableCell>
                        <asp:Label ID="Label8" runat="server" Text="Hozzászólás tárgya: "></asp:Label>
                    </asp:TableCell>
                </asp:TableRow>
                <asp:TableRow>
                    <asp:TableCell>
                        <asp:TextBox ID="CommentTitle" runat="server" Width="400px" AutoPostBack="false"></asp:TextBox>
                    </asp:TableCell>
                </asp:TableRow>
                <asp:TableRow>
                    <asp:TableCell>
                        <asp:Label ID="Label10" runat="server" Text="Hozzászólás szövege: "></asp:Label>
                    </asp:TableCell>
                </asp:TableRow>
                <asp:TableRow>
                    <asp:TableCell>
                        <asp:TextBox ID="CommentContent" runat="server" Width="400px" 
                        AutoPostBack="false" Height="100px" TextMode="MultiLine"></asp:TextBox>
                    </asp:TableCell>
                </asp:TableRow>
                <asp:TableRow>
                    <asp:TableCell HorizontalAlign="Right">
                        <asp:Button ID="CommentSubmit" runat="server" Text="Hozzászólok" onclick="CommentSubmit_Click"/>
                    </asp:TableCell>
                </asp:TableRow>
            </asp:Table>
        </fieldset>
        <asp:Panel ID="CommentPanelList" runat="server">
        
        </asp:Panel>
    </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
